#ifndef GLASSCONSOLE_H
#define GLASSCONSOLE_H

#include <windows.h>
#include <dwmApi.h>

class GlassConsole;

#include "Utilities.h"
#include "WMCallback.h"
#include "CassiopeiaComponent.h"

class GlassConsole : public CassiopeiaComponent
{
public:
	GlassConsole(HINSTANCE hInstance);
	~GlassConsole();
	CCState Activate();
	CCState Deactivate();
private:
	void RemoveGlassFromConsoleWindow(HWND hWnd);
	void ExtendGlassIntoConsoleWindow(HWND hWnd);

	static set<GlassConsole*> instances;
	static HWINEVENTHOOK hWinEventHook;
	static BOOL dwmActive;
	static WMCallback * wmCallback;

	static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam);
	static VOID CALLBACK WinEventProc(HWINEVENTHOOK hWinEventHook,DWORD dwEvent,HWND hWnd,LONG idObject,LONG idChild,DWORD idEventThread,DWORD dwmsEventTime);
	static LRESULT CALLBACK WndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
};

#endif
